package cn.stylefeng.guns.modular.business.frequency.finance.service;

import cn.stylefeng.guns.core.pojo.page.PageResult;
import cn.stylefeng.guns.core.pojo.response.ResponseData;
import cn.stylefeng.guns.modular.business.frequency.finance.entity.Finance;
import cn.stylefeng.guns.modular.business.frequency.finance.model.param.FinanceCheckVO;
import cn.stylefeng.guns.modular.business.frequency.finance.model.param.FinanceDTO;
import cn.stylefeng.guns.modular.business.frequency.finance.model.param.FinanceParam;
import cn.stylefeng.guns.modular.business.frequency.finance.model.param.SettlementVO;
import cn.stylefeng.guns.modular.business.frequency.finance.model.result.*;
import cn.stylefeng.guns.modular.business.frequency.financecheck.entity.FinanceCheck;
import cn.stylefeng.guns.modular.business.frequency.financedetail.entity.FinanceDetail;
import cn.stylefeng.guns.modular.business.frequency.financesettlement.entity.FinanceSettlement;
import cn.stylefeng.guns.modular.business.frequency.financetransport.entity.FinanceTransport;
import cn.stylefeng.guns.modular.business.frequency.orderextrafee.entity.OrderExtraFee;
import cn.stylefeng.guns.modular.business.frequency.orderfinish.model.param.PkgFinanceGross;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * 订单财务信息表 服务类
 *
 * @author yujie
 * @date 2023/05/09 17:17
 */
public interface FinanceService extends IService<Finance> {

    /**
     * 分页查询订单财务信息表
     *
     * @author yujie
     * @date 2023/05/09 17:17
     */
    PageResult<Finance> page(FinanceParam financeParam);

    /**
     * 查询所有订单财务信息表
     *
     * @author yujie
     * @date 2023/05/09 17:17
     */
    List<Finance> list(FinanceParam financeParam);

    /**
     * 添加订单财务信息表
     *
     * @author yujie
     * @date 2023/05/09 17:17
     */
    void add(FinanceParam financeParam);

    /**
     * 删除订单财务信息表
     *
     * @author yujie
     * @date 2023/05/09 17:17
     */
    void delete(FinanceParam financeParam);

    /**
     * 编辑订单财务信息表
     *
     * @author yujie
     * @date 2023/05/09 17:17
     */
    void edit(FinanceParam financeParam);

    /**
     * 查看详情订单财务信息表
     *
     * @author yujie
     * @date 2023/05/09 17:17
     */
    Finance detail(FinanceParam financeParam);

    void changeFinanceStatus(Long id);

    void changeFinanceStatus2(Long id);

    ResponseData getCollectionList(Page<Object> defaultPage, FinanceDTO financeDTO);

    ResponseData getPaymentList(Page<Object> defaultPage, FinanceDTO financeDTO);

    List<FinanceTransport> getPaymentTransportListByOrderId(String orderId);

    List<OrderExtraFee> getPaymentExtraListByOrderId(String orderId);

    List<PkgFinanceCheck> getFinanceCheckList(FinanceDTO financeDTO);

    PkgFinanceCheck getFinanceCheckSummary(FinanceDTO financeDTO);

    ResponseData getFinanceGrossList(Page<Object> defaultPage, FinanceDTO financeDTO);

    boolean checkSettlement(SettlementVO settlementVO, StringBuilder errorMsg);

    void settlement(SettlementVO settlementVO);

    boolean checkTransportSettlement(TransportSettlementVO transportSettlementVO, StringBuilder errorMsg);

    void transportSettlement(TransportSettlementVO transportSettlementVO);

    boolean checkExtraSettlement(TransportSettlementVO transportSettlementVO, StringBuilder errorMsg);

    void extraSettlement(TransportSettlementVO transportSettlementVO);

    String getSettlementIdByTransportNo(String transportNo);

    List<FinanceDetail> getCheckFinanceDetail(FinanceDTO financeDTO);

    void dealCheckSettlement(List<FinanceDetail> list, List<PkgFinanceCheck> checkList, FinanceCheckVO financeCheckVO);

    void dealCheckSettlement2(List<FinanceDetail> list, List<PkgFinanceCheck> checkList, FinanceCheckVO financeCheckVO);

    void exportCheckExcel(FinanceDTO financeDTO, HttpServletResponse response);

    void exportCheckDetailExcel(String id, HttpServletResponse response);

    ResponseData getFinanceCheckListPage(Page<Object> defaultPage, FinanceDTO financeDTO);

    FinanceCheck getFinanceCheckDetail(String id);

    PageResult<PkgFinanceSettlement> getFinanceSettlementList(Page page,SettlementVO settlementVO);

    boolean checkFinanceSettlementUpdate(FinanceSettlement financeSettlement, StringBuilder errorMsg);

    void updateFinanceSettlement(FinanceSettlement financeSettlement);

    void repealFinanceCheck(Long id, List<Long> ids);

    boolean checkRepealFinanceSettlement(Long id, StringBuilder errorMsg);

    void repealFinanceSettlement(Long id);

    void exportCollectionExcel(FinanceDTO financeDTO, HttpServletResponse response);

    void exportPaymentExcel(FinanceDTO financeDTO, HttpServletResponse response);

    void exportGross(FinanceDTO financeDTO, HttpServletResponse response);

    void settlementFincecheck(FinanceCheckVO financeCheck);

    boolean checkOrderExtraFeeAdd(OrderExtraFee orderExtraFee, StringBuilder errorMsg);

    void addOrderExtraFee(OrderExtraFee orderExtraFee);

    boolean checkOrderExtraFeeUpdate(OrderExtraFee orderExtraFee, StringBuilder errorMsg);

    void updateOrderExtraFee(OrderExtraFee orderExtraFee);

    OrderExtraFee getExtraFeeDetail(String id);

    boolean checkOrderExtraFeeDelete(String id, StringBuilder errorMsg);

    void deleteOrderExtraFee(String id);

    List<OrderExtraFee> getExtraFeeListByOrderId(String orderId);

    ResponseData getSiteCollection(Page<Object> defaultPage);

    ResponseData sitePayment();

}